package com.smart.community.region.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 区域查询条件DTO
 * 
 * @author Wu.Liang
 * @since 2024-12-21
 * @version 2.0.0
 */
@Data
@Schema(description = "区域查询条件DTO")
public class RegionQueryDTO {

    @Schema(description = "区域编码（精确查询）")
    private String regionCode;

    @Schema(description = "区域名称（模糊查询）")
    private String regionName;

    @Schema(description = "父区域ID")
    private Long parentId;

    @Schema(description = "区域层级：1-5")
    private Integer regionLevel;

    @Schema(description = "区域类型：1-省，2-市，3-区县，4-街道，5-社区")
    private Integer regionType;

    @Schema(description = "状态：0-禁用，1-启用")
    private Integer status;

    @Schema(description = "排序字段", example = "create_time")
    private String orderBy;

    @Schema(description = "排序方向：asc-升序，desc-降序", example = "desc")
    private String orderDirection;

    @Schema(description = "当前页码", example = "1")
    private Integer current = 1;

    @Schema(description = "每页大小", example = "10")
    private Integer size = 10;
    
    // 兼容性方法，支持pageNum和pageSize参数
    public Integer getPageNum() {
        return current;
    }
    
    public void setPageNum(Integer pageNum) {
        this.current = pageNum;
    }
    
    public Integer getPageSize() {
        return size;
    }
    
    public void setPageSize(Integer pageSize) {
        this.size = pageSize;
    }
} 